<?php

/* * 
 * 分类关系
 */
namespace Api\Model;
use Think\Model;
class CategoryRelationshipModel extends Model {

    //映射
    protected $_map = array(

    );

    //获取分类列表
    public function getCategoryList($referenceId, $type) {

        $map['reference_id'] = $referenceId;
        $map['relation_type'] = $type;

        $list = $this
            ->field("category_id, category_name")
            ->where($map)
            ->order("create_time ASC")
            ->select();

        return $list;

    }
}

